import './App.css';
import Header from './components/header/header';
import Main from "./components/main/main";
import Popup from "./components/popup/popup";
import {useState} from "react";
import UseSecondsCount from "./components/timer-function/timerFunction";
import {Context} from "./context";

function App() {
    const {seconds} = UseSecondsCount();
    let [popupActive, setPopupActive] = useState(false)
    if (seconds===0) {
        popupActive=true
    }

  return (
      <Context.Provider value={{seconds}}>
          <Popup active={popupActive} setActive={setPopupActive}/>
          <Header/>
          <Main/>
      </Context.Provider>
  );
}

export default App;
